﻿<%@ Page Title="" Language="C#" AutoEventWireup="true" CodeBehind="EditVariable.aspx.cs" Inherits="BEELab.EditVariable" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title></title>
        <link rel="stylesheet" href='./Content/css/style.css' />
        <link rel="stylesheet" type="text/css" href='./Content/css/source/jquery.fancybox.css' media="screen" />
        <script src='<%: ResolveClientUrl("~/Scripts/jquery-1.10.2.min.js")%>'></script>
        <script src='<%: ResolveClientUrl("~/Content/css/source/jquery.fancybox.js?v=2.1.5")%>'></script>
    </head>
    <body style="width: 640px; padding: 24px; background-color:#ffffff ">

        <asp:literal id="literal1" runat="server"></asp:literal>

        <form id="form1" runat="server">
            <div id="wrap" class="clearfix">
                <% if(Request.QueryString["ID"] != null) { %>
                    <asp:Label ID="lblEdit" runat="server">
                        <h2 class="headline">Edit Variable</h2>
                    </asp:Label>
                <% } %>

                <div id="new-data">
                    <div class="sign-form">
                        <div class="input-hold">
                            <asp:Label ID="Label3" CssClass="sign-label" AssociatedControlID="txtName" runat="server">Name</asp:Label>
                            <asp:TextBox CssClass="sign-input" ID="txtName" runat="server" Width="200px"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" ForeColor="Red" ValidationGroup="VariableGroup" ControlToValidate="txtName" runat="server" ErrorMessage="* Name is required" Text="*"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ValidationExpression="[a-zA-Z][_a-zA-Z0-9]*" EnableClientScript="True" ID="RegularExpressionValidator1" ForeColor="Red" ValidationGroup="VariableGroup" ControlToValidate="txtName" runat="server" ErrorMessage="* Name must be a valid JS variable name"></asp:RegularExpressionValidator>
                            <asp:RegularExpressionValidator ValidationExpression=".*" EnableClientScript="True" ID="RegexValidator2" ForeColor="Red" ValidationGroup="VariableGroup" ControlToValidate="txtName" runat="server" ErrorMessage="* Name already in use"></asp:RegularExpressionValidator>
                        </div>

                        <div class="input-hold">
                            <asp:Label ID="Label6" CssClass="sign-label" AssociatedControlID="txtDescription" runat="server">Description</asp:Label>
                            <asp:TextBox CssClass="text-area" ID="txtDescription" runat="server" TextMode="MultiLine"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" ForeColor="Red" ValidationGroup="VariableGroup" ControlToValidate="txtDescription" runat="server" ErrorMessage="* Description is required" Text="*"></asp:RequiredFieldValidator>
                        </div>

                        <div class="input-hold">
                            <asp:Label ID="Label7" CssClass="sign-label1" AssociatedControlID="txtDefaultValue" runat="server">Default Value <br /><span>String values must be enclosed by double quotation marks</span></asp:Label>
                            <asp:TextBox ID="txtDefaultValue" CssClass="sign-input" runat="server"></asp:TextBox>
                        </div>

                        <div class="input-hold">
                            <asp:Label ID="Label8" CssClass="sign-label" AssociatedControlID="rblScope" runat="server">Scope</asp:Label>
                            <asp:RadioButtonList CssClass="sign-radio list-space" runat="server" ID="rblScope" RepeatDirection="Horizontal">
                                <asp:ListItem Text="Session" Value="Session"></asp:ListItem>
                                <asp:ListItem Text="Subject" Value="Subject"></asp:ListItem>
                            </asp:RadioButtonList>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ForeColor="Red" ValidationGroup="VariableGroup" ControlToValidate="rblScope" runat="server" ErrorMessage="* Scope is required." Display="Dynamic" Text="*"></asp:RequiredFieldValidator>

                            <asp:RequiredFieldValidator ID="rfvddlScope" ForeColor="Red" ValidationGroup="VariableGroup" ControlToValidate="rblScope" runat="server" ErrorMessage="* Scope is required." InitialValue="Selecet Scope" Display="Dynamic" Text="*"></asp:RequiredFieldValidator>
                        </div>

                        <div class="input-hold">
                            <asp:Button CssClass="sign-submit" ID="Button2" Text="Submit" runat="server" ValidationGroup="VariableGroup" OnClick="Button2_Click" OnClientClick="&quot;parent.$.fancybox.close();&quot;" />
                        </div>
                    </div>
                    <div class="error">
                        <p>&nbsp</p>
                    </div>

                </div>
            </div>
        </form>
    </body>
</html>